home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.3 KB | 34 lines | [TEXT/GEOL] |
- Item 7606123 9-May-88 17:46
-
- From: D0830 Avalon Group, Dev, Rudulph Burger
-
- To: MACDTS Macintosh Developer Technical Supt.
-
- cc: MACAPP$ MacApp Interest List
-
- Sub: TDeskScrapView Bug Fix
-
- In case it hasn't already been reported, I thought I'd let you know of a bug I
- found in the MacApp v1.1.1 TDeskScrapView.AboutToDraw method which prevents the
- standard desk scrap view from handling some large scraps.
-
- The local procedure LookForScrapType calls GetScrap, assigning the returned
- scrap length to a variable of type OSErr. That number is then checked for
- validity, with values less than zero indicating an error condition.
- Unfortunately, GetScrap returns a LONGINT, and OSErr is an INTEGER. The high
- order word of the LONGINT is lost during the assignment; thus scrap lengths of
- 32K or greater may incorrectly be converted to a negative number, producing an
- error.
-
- The fix is simple; in MacApp.inc3.p, find:
- PROCEDURE TDeskScrapView.AboutToDraw; OVERRIDE;
- ...
- PROCEDURE LookForScrapType(theResType: ResType): BOOLEAN;
- VAR
- err: OSErr;
- ^^^^^
-
- And change the incorrect line to:
- err: LONGINT;
-
-